logo



1 Instructions

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com. Diverse cheatsheets can be found in https://www.rstudio.com/resources/cheatsheets/. This section gives quick instructions to display text, code, tables and figures.

1.1 Text

Text in R markdown has several inline codes for costumization. The book in https://bookdown.org/yihui/rmarkdown/ offers a detailed guideline. Moreover, a cheatsheet can be downdloaded with the following link https://raw.githubusercontent.com/rstudio/cheatsheets/main/rmarkdown.pdf.

1.2 Code

Code is automaticelly embedded unless echo chunk option is set to FALSE. Evaluation of code in a given chunk can be skiped by setting eval to FALSE. Code chunks should always be unically named.

#Example of code chunk

list(a = 1:6, b = 1:10)

$a [1] 1 2 3 4 5 6

$b [1] 1 2 3 4 5 6 7 8 9 10


1.3 Tables

The knitr::kable function can be used for displaying tables, see table 1.1. Consult https://haozhu233.github.io/kableExtra/awesome_table_in_html.html for other costumization options. Table caption is added with the argument caption of the kable function.

df <- data.frame(name = c("a", "b", "c", "d", "e", "f"), col1 = 1:6, col2 = 1:6)

knitr::kable(df, caption = "Example of table caption.") %>%
kable_styling(
  font_size = 12,
  bootstrap_options = c("striped", "hover", "condensed", "responsive"),
  fixed_thead = TRUE
) %>%
  scroll_box(width = "100%", height = "350px")
Table 1.1: Example of table caption.
name col1 col2
a 1 1
b 2 2
c 3 3
d 4 4
e 5 5
f 6 6


1.4 Figures

Figures/plots can also by embedded using diverse packages. The packages ggplot2 and plotly (interactive) are recommended as they are versatile and easy to use. Cheatsheet for ggplot2 can be found in https://raw.githubusercontent.com/rstudio/cheatsheets/main/data-visualization.pdf. For plotly the website https://plotly.com/r/ offers examples and a cheatsheet can be downdloaded in https://images.plot.ly/plotly-documentation/images/r_cheat_sheet.pdf. Note that the echo = FALSE parameter can be added to the code chunk to prevent printing of the R code that generate the plots.

1.4.1 Example ggplot2

ggplot(pressure, aes(temperature, pressure)) +
geom_point() +
theme_bw()
Plot caption example

Figure 1.1: Plot caption example

1.4.2 Example plotly

plot_ly(pressure, x = ~temperature, y = ~pressure, type = "scatter", mode = "markers+lines")

Figure 1.2: Plot caption example



2 Signature

The report was produced on 2023-09-03 21:30:27.158008. The data and report are stored in C:/Users/Ricardo Cunha/Documents/GitHub/streamFind/dev of the workstation RICARDO-T14 under the user Ricardo Cunha.